package com.wiken.commentservice.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wiken.commentservice.DTO.CommentStoreDTO;
import com.wiken.commentservice.DTO.CommentUserDTO;
import com.wiken.commentservice.VO.StoreCommodityVO;
import com.wiken.commentservice.entity.Comment;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author wiken
 * @since 2022-12-28
 */


public interface CommentMapper extends BaseMapper<Comment> {
    Page<CommentStoreDTO> getCommentByUserId(String userId, Page page);

    Page<CommentUserDTO> getCommentByStoreId(String storeId, String userId, Page page);

    String getUserIdByOrderCommodityId(String orderCommodityId, String userId);

    Page<StoreCommodityVO> getCommentOfNeedComment(String userId, Page page);

    Page<StoreCommodityVO> getCommentOfCommented(String userId, Page page);
}
